package com.bnyy.message.bean;

import com.bnyy.common.bean.UserInfo;
import com.bnyy.message.enums.GroupChatIdentity;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Author : 关炳鹏
 * Description : 群组
 * Date : 2022/11/10
 **/
public class ContactGroup extends Contact {

    private int wear_id;
    private String imei;
    private int auth_type;
    private int group_type; // 群聊类型 1:家庭 2普通
    private String group_name;
    private boolean is_open;
    private ArrayList<String> imgs;
    @SerializedName("member_number")
    private int memberCount;

    public int getWear_id() {
        return wear_id;
    }

    public void setWear_id(int wear_id) {
        this.wear_id = wear_id;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public int getAuth_type() {
        return auth_type;
    }

    public void setAuth_type(int auth_type) {
        this.auth_type = auth_type;
    }

    public int getGroup_type() {
        return group_type;
    }

    public void setGroup_type(int group_type) {
        this.group_type = group_type;
    }

    public String getGroup_name() {
        return group_name;
    }

    public void setGroup_name(String group_name) {
        this.group_name = group_name;
    }

    public boolean isIs_open() {
        return is_open;
    }

    public void setIs_open(boolean is_open) {
        this.is_open = is_open;
    }

    public ArrayList<String> getImgs() {
        return imgs;
    }

    public void setImgs(ArrayList<String> imgs) {
        this.imgs = imgs;
    }

    public int getMemberCount() {
        return memberCount;
    }

    public void setMemberCount(int memberCount) {
        this.memberCount = memberCount;
    }

    public GroupChatIdentity getGroupChatIdentity() {
        return GroupChatIdentity.getGroupAuthority(auth_type);
    }

    public static class Member extends ContactUser {

        private int auth_type;

        public int getAuth_type() {
            return auth_type;
        }

        public void setAuth_type(int auth_type) {
            this.auth_type = auth_type;
        }

        public GroupChatIdentity getGroupChatIdentity() {
            return GroupChatIdentity.getGroupAuthority(auth_type);
        }
    }
}
